<?php

namespace App\Http\Controllers\Web;

use App\ConstDir\ErrorConst;
use App\Http\Controllers\Web\BaseController;
use App\Repository\Repositories\Interfaces\GuestbookRepository;
use Illuminate\Http\Request;

class GuestbookController extends BaseController
{
    protected $request;
    protected $guestbook;
    public function __construct(GuestbookRepository $guestbook ,Request $request)
   {
       $this->request=$request;
       $this->guestbook=$guestbook;
   }

    public function store(){
        $data=$this->request->all();
        $ret=$this->guestbook->create($data);
        return $this->success(ErrorConst::SUCCESS_CODE, $ret);

    }
}